package cn.ito.zjgsu.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.w3c.dom.UserDataHandler;

import cn.ito.zjgsu.domain.User;
import cn.ito.zjgsu.domain.UserExample;
import cn.ito.zjgsu.mapping.UserMapper;
import cn.ito.zjgsu.service.UserService;

@Service
@Transactional
public class UserServiceImpl implements UserService{
	@Resource
	private UserMapper userMapper;

	@Override
	public User findUserByExample(UserExample userExample) {
		List<User> users = userMapper.selectByExample(userExample);
		if(null != users && !users.isEmpty()){
			return users.get(0);
		}
		return null;
	}

}
